package com.tyt.travel.controller.v1;

import com.tyt.travel.service.CommonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p></p>
 * <p>
 * <PRE>
 * <BR>    修改记录
 * <BR>-----------------------------------------------
 * <BR>    修改日期         修改人          修改内容
 * </PRE>
 *
 * @author tianyun
 * @version 1.0
 * @date Created in 2021年02月10日 19:57
 * @since 1.0
 */
@Slf4j
@RestController
@RequestMapping("/common")
@Api(value = "通用基础接口", tags = {"通用基础接口"})
public class CommonController {

    @Autowired
    CommonService commonService;
    /**
     * 上传图片
     *
     * @return
     */
    @ApiOperation(value = "用户注册", notes = "用户注册")
    @PostMapping("/uploadPicture")
    public String uploadPicture(MultipartFile file) {
        return commonService.uploadPicture(file);
    }
}
